1. Technical Field
This invention is generally directed to a file system for use in a computer, embedded controller, or the like. More particularly, this invention is directed to a file system having an inverted hierarchical structure.
2. Related Art
Computers, embedded controllers, and other microprocessor based systems are typically constructed from a variety of different hardware components. The hardware components may include a processor, I/O devices, human interface devices, and the like. Additionally, such systems use memory storage units to maintain the data used in the system. The memory storage units may take on a variety of different forms including, but not limited to, hard disk drives, floppy disk drives, random access memory, flash memory, and the like.
High-level application programs that are executed in such systems must often interact seamlessly with these hardware components, including the memory storage units. To this end, many systems run an operating system that acts as an interface between the application programs and the system hardware. File system software may be included as part of the operating system, or it may be provided as an ancillary software component that interacts with the operating system. In either instance, the file system software organizes the data within the memory storage units for ready access by the processor and the high-level application programs that the processor executes.
In a traditional file system, the file system software organizes the data within the memory storage units in a hierarchical structure that includes data files and corresponding containers, called directories. The traditional hierarchical structure is in the form of an upside-down tree having a starting directory that is called the root directory. Additional directories and files may depend from the root directory. The additional directories, in turn, may include further subdirectories and files.
The file system software maintains one or more metafiles that include records used to keep track of the name and attributes of each file/directory entry in the file system. These attributes include, for example, whether the entry is a data file or directory, read only file, hidden file, system file, and the like. The information needed to physically access file data that is stored in the memory storage unit also may be contained in or pointed to by the records in the metafiles.
When the file system is organized using the traditional file system hierarchy, the processor must update a substantial number of different records in the metafiles when any change is made to a data file or directory. Updating of the metafile records must occur, for example, whenever a file or directory is created, renamed, or moved from one directory to another. The substantial number of different records in the metafiles that must be updated under these circumstances increases the likelihood that an update to a given record will not occur if, for example, the system experiences a power loss or other hardware or software failure. Further, reconstruction of the file system after such a failure may be complicated and time-consuming when the files are organized in the traditional manner. Accordingly, an alternative to the traditional file system hierarchy is needed.